# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(ijkplayer)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-int-conversion")

add_definitions(-DOHOS_PLATFORM)

add_library(ijkplayer_napi SHARED
            ijkplayer_napi_init.cpp
            ijkplayer_napi_manager.cpp
            )

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/api)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ijkplayer)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ijksdl)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/proxy)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/napi)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/utils/napi)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/ffmpeg/include)

target_link_libraries(ijkplayer_napi PUBLIC ijkplayer_api)
target_link_libraries(ijkplayer_napi PUBLIC uv)